package cmpe451.group7.ourcity.dao;

import java.util.List;

import cmpe451.group7.ourcity.entity.Tag;
import cmpe451.group7.ourcity.entity.User;

/**
 * DAO interface for Tag class.
 */
public interface TagDAO extends GenericDAO<Tag> {

	/**
	 * Insert a new tag with the given tag.
	 * 
	 * @param tagname
	 */
	public Tag insertNewTag(String tagname);

	/**
	 * Find all tags with the given tag.
	 * 
	 * TODO: This should be improved for close results.
	 * 
	 * @param tagName
	 * @return Returns null for error cases.
	 */
	public List<Tag> findByRestrictions(String tagName);

	public Tag findByMID(String getmID);

	public List<Tag> getTagsofUser(User user);

	public Tag saveIfNotExists(Tag t);

}
